home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
pdcurs21.zip
/
PORTABLE.ZIP
/
WADDSTR.C
< prev
next >
Wrap
Text File
|
1992-11-21
|
2KB
|
58 lines
#define CURSES_LIBRARY 1
#include <curses.h>
#undef waddstr
#ifndef NDEBUG
char *rcsid_waddstr = "$Header: c:/curses/portable/RCS/waddstr.c%v 2.0 1992/11/15 03:29:21 MH Rel $";
#endif
/*man-start*********************************************************************
waddstr() - add string to window
X/Open Description:
These routines write all the characters of the null-terminated
string str on the given window. The functionality is equivalent
to calling waddch() once for each character in the string.
NOTE: addstr(), mvaddstr(), and mvwaddstr() are macros.
PDCurses Description:
The *raw*() routines output 8 bit values. These contrast to their
normal counterparts which output 7 bit values and convert control
character to the ^X notation.
str is a standard 8 bit character string WITHOUT embedded attributes.
X/Open Return Value:
The waddstr() function returns OK on success and ERR on error.
PDCurses Errors:
It is an error to call this function with a NULL window pointer.
Portability:
PDCurses int waddstr( WINDOW* win, char* str );
X/Open Dec '88 int waddstr( WINDOW* win, char* str );
BSD Curses int waddstr( WINDOW* win, char* str );
SYS V Curses int waddstr( WINDOW* win, char* str );
**man-end**********************************************************************/
int waddstr(WINDOW *win, char *str)
{
if (win == (WINDOW *)NULL)
return( ERR );
while (*str)
{
if (waddch(win, *str++) == ERR)
{
return( ERR );
}
}
return( OK );
}